/*    */ package com.zimbra.cs.mailbox;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.service.ServiceException.Argument;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class BadOrganizerException
/*    */   extends ServiceException
/*    */ {
/*    */   private static final long serialVersionUID = 5950670701876236413L;
/*    */   
/*    */   private BadOrganizerException(String message, Throwable cause)
/*    */   {
/* 25 */     super(message, "service.INVALID_REQUEST", false, cause, new ServiceException.Argument[0]);
/*    */   }
/*    */   
/*    */   public static class DiffOrganizerInComponentsException
/*    */     extends BadOrganizerException
/*    */   {
/*    */     private static final long serialVersionUID = -1061008479818171529L;
/*    */     
/*    */     public DiffOrganizerInComponentsException(String message, Throwable cause)
/*    */     {
/* 35 */       super(cause, null);
/*    */     }
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */ 
/*    */   public static BadOrganizerException ADD_ORGANIZER_NOT_ALLOWED(String newOrganizer, String compDescription)
/*    */   {
/* 44 */     return new BadOrganizerException(String.format("Adding ORGANIZER '%s' for %s is not allowed", new Object[] { newOrganizer, compDescription }), null);
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   public static BadOrganizerException DEL_ORGANIZER_NOT_ALLOWED(String origOrganizer, String compDescription)
/*    */   {
/* 53 */     return new BadOrganizerException(String.format("Removing ORGANIZER '%s' for %s is not allowed", new Object[] { origOrganizer, compDescription }), null);
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   public static BadOrganizerException CHANGE_ORGANIZER_NOT_ALLOWED(String oldOrganizer, String newOrganizer, String compDescription)
/*    */   {
/* 62 */     return new BadOrganizerException(String.format("Changing ORGANIZER of %s is not allowed: old='%s' new='%s'", new Object[] { compDescription, oldOrganizer, newOrganizer }), null);
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   public static BadOrganizerException ORGANIZER_INTRODUCED_FOR_EXCEPTION(String newOrganizer, String compDescription)
/*    */   {
/* 71 */     return new DiffOrganizerInComponentsException(String.format("For %s, instance with ORGANIZER '%s' is not allowed.  Main rule has no ORGANIZER", new Object[] { compDescription, newOrganizer }), null);
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   public static BadOrganizerException DIFF_ORGANIZER_IN_COMPONENTS(String oldOrganizer, String newOrganizer, String compDescription)
/*    */   {
/* 81 */     return new DiffOrganizerInComponentsException(String.format("For %s, instance ORGANIZER '%s' should be same as main rule ORGANIZER '%s'", new Object[] { compDescription, newOrganizer, oldOrganizer }), null);
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   public static BadOrganizerException MISSING_ORGANIZER_IN_SINGLE_INSTANCE(String oldOrganizer, String compDescription)
/*    */   {
/* 91 */     return new DiffOrganizerInComponentsException(String.format("For %s, instance is missing an ORGANIZER.  Must be same as main rule ORGANIZER '%s'", new Object[] { compDescription, oldOrganizer }), null);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/mailbox/BadOrganizerException.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */